package com.example.demo.controller;

import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Question TestController
 * @Date 2022/11/17 15:10
 * @Solution
 */
@RestController
@Slf4j
public class TestController {
    //第一种写法
//    Logger logger = LoggerFactory.getLogger(TestController.class);
    //使用lombok写法
    @RequestMapping("/sayhi")
    public String sayHi() {
        log.info("hi");
        return "hi";
    }
}
